package com.avic.modules.task.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author zhangzikang 设备状态表
 * @date 2022-08-14
 */
@Data
@TableName("task_status")
@NoArgsConstructor
public class TaskStatus {

    @TableId(value="ID", type = IdType.AUTO)
    private Long id;

    // 设备id
    private String equipId;

    // 1:正在运行, 0:结束运行
    private Integer rulStatus;

    // 健康状态字典查看对应值
    private Integer ehrStatus;

    public void copy(TaskStatus source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }

}
